package com.shop.dao;

import com.shop.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {

//    @Options(useGeneratedKeys = true, keyProperty = "orderId", keyColumn = "id")
    int insertSelective(Order order);


    Order selectByPrimaryKey(Long orderId);

    List<Order> selectByUserId(Long userId);

    List<Order> selectByStoreId(Long storeId);

    List selectByBuyerIdAndMonth(Long userId, int month);

    int updateStatusByPrimaryKey(Long orderId,int status);

    List selectByStoreIdAndMonth(Long storeId, int month);
}
